package com.appli.MetroBrussels;

import com.google.ads.*;
import com.google.android.apps.analytics.GoogleAnalyticsTracker;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

public class MainBrussels extends Activity implements OnClickListener {

	GoogleAnalyticsTracker tracker;
	private static final String MY_AD_UNIT_ID = "a14dc87f9e0d481";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		tracker = GoogleAnalyticsTracker.getInstance();
		tracker.start("UA-23011636-4",20, this);
		tracker.trackPageView("/HomeScreen");
		AdView adView = new AdView(this, AdSize.BANNER, MY_AD_UNIT_ID);
		LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout);
		layout.addView(adView);
		adView.loadAd(new AdRequest());
		/*((Button)findViewById(R.id.metro)).setOnClickListener(this);
		  ((Button)findViewById(R.id.evening)).setOnClickListener(this);
		  ((Button)findViewById(R.id.noctis)).setOnClickListener(this);*/
	}

	@Override
	public void onClick(View v) {
		/*
			 switch (v.getId()){
			 case R.id.metro:
				 Intent j = new Intent(this, MetroBrussels.class);
				 j.putExtra("map", R.drawable.metro);
				 tracker.trackEvent(
				            "Clicks",  // Category
				            "map",  // Action
				            "metro", // Label
				            0);       // Value
				 startActivity(j);
				 break;
			 case R.id.evening:
				 Intent k = new Intent(this, MetroBrussels.class);
				 k.putExtra("map", R.drawable.evening);
				 tracker.trackEvent(
						 "Clicks",  // Category
						 "map",  // Action
						 "evening", // Label
						 0);       // Value
				 startActivity(k);	
				 break; 
			 case R.id.noctis:
				 Intent i = new Intent(this, MetroBrussels.class);
				 i.putExtra("map", R.drawable.noctis);
				 tracker.trackEvent(
						 "Clicks",  // Category
						 "map",  // Action
						 "noctis", // Label
						 0);       // Value
				 startActivity(i);	
				 break;
			 }*/
	}			
}
